<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>补充</title>
</head>

<body>
    <script src="/js/vue.js"></script>
    <div id="app">
        <!--<ul>
            <li v-for="item in name" :key="item"></li>
        </ul>-->

        <h2>{{name}}</h2>
        <button @click="btnClick">botton</button>
    </div>

    <script>
        let app = new Vue({
            el: "#app",
            date: {
                msg: 'hello world',
                name:['A','D','B','C']
            },
            methods:{
                btnClick(){
                    Vue.set(this.name,0,"Shane")
                }
            }
        })
    </script>
</body>

</html>